package com.qst.rongxiaotong.mapper;

import com.qst.rongxiaotong.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import java.util.List;


@Mapper
public interface UserMapper {
    @Select("select * from tb_user where user_name=#{username}")
    User getByUsername(String username);

    User selectByPrimaryKey(String userName);

    @Select("select * from tb_user where user_name=#{currentuserName}")
    User finduser(String currentuserName);

//admin用户管理
    List<User> selectAll();//fenye显示用户

    int updateByPrimaryKeySelective(User user);//修改用户，

    int deleteByPrimaryKey(String userName);//删除用户，

    User selectByPrimaryKey(String userName);//通过userName,查
    @Select("select * from tb_user where user_name=#{username}")
    User getByUsername(String username);

}

